<extend name="Index/base" /><meta charset="utf-8">

<block name="style">
<style type="text/css">
.tableC th{padding:0;}
.div_menu{ width:100%; height:40px;}
.div_menu ul{list-style:none; margin:0; padding:0;}
.div_menu li{float:left; padding:10px 40px; border-right:#999 1px solid; cursor:pointer;}
.div_menu li:last-child{border-right:0px;}
</style>
</block>
<block name="mainCont">
	<div id="div_base_info">
	<table id="tb_base_info" class="tableC" align="center" border="0" cellpadding="0" cellspacing="0">
    	<tr><th colspan="2"><div class="div_menu"><ul><li class="li_base_info">基本设置</li><li class="li_pwd_info">密码设置</li></ul></div></th></tr>
       	<form action="reInfo" method="post">
       	<tr><td width="60px">
        <label for="old_password">姓名</label></td><td>
        	<input type="text" id="nickname" name="nickname" value="{$Think.session.bw_user.nickname}" class="textC">
        </td></tr>
        <tr><td width="60px">
        <label for="old_password">页面条数</label></td><td>
        	<input type="number" id="pagecount" name="pagecount" value="{$Think.session.bw_user.pagecount}" class="textC">
        </td></tr>
       <tr><td></td><td><input type="submit" value="更改" class="buttonA"></td></tr>
      </form>
    </table>
    </div>
    
    <div id="div_pwd_info">
	<table id="tb_pwd_info" class="tableC" align="center" border="0" cellpadding="0" cellspacing="0">
    	<tr><th colspan="2"><div class="div_menu"><ul><li class="li_base_info">基本设置</li><li class="li_pwd_info">密码设置</li></ul></div></th></tr>
       	<form action="rePwd" method="post" id="form_repwd">
       	<tr><td width="60px">
        <label for="old_password">原密码</label></td><td><input type="password" id="old_password" name="old_password" class="textC">
        </td></tr>
        <tr><td width="60px">
        <label for="new_password1">新密码</label></td><td><input type="password" id="new_password1" name="new_password1" class="textC">
        </td></tr>
        <tr><td width="60px">
        <label for="new_password2">新密码</label></td><td><input type="password" id="new_password2" name="new_password2" class="textC">
        </td></tr>
       <tr><td></td><td><input type="button" id="form_submit" value="更改" class="buttonA"></td></tr>
      </form>
    </table>
    </div>
    
    
</block>

<block name="script">
<script language="javascript">
/*初始化状态*/
var f_bgc, f_clr;
$("#div_base_info").css("display","block");
$("#div_pwd_info").css("display","none");
$(".li_base_info").css("background-color","#555").css("color","#EEE");

/*设置菜单内容切换*/
$(".div_menu li").click(function(){
	switch($(this).attr("class")){
		case "li_base_info":
			$("#div_base_info").css("display","block");
			$("#div_pwd_info").css("display","none");
		break;
		case "li_pwd_info":
			$("#div_base_info").css("display","none");
			$("#div_pwd_info").css("display","block");
		break;
		default:break;
	}
	$(".div_menu li").css("background-color","#EEE").css("color","#555");
	$("."+$(this).attr("class")).css("background-color","#555").css("color","#EEE");
});
/*密码提交*/
$("#form_submit").click(function(){
	var old_password	= $("#old_password").val();
	var new_password1	= $("#new_password1").val();
	var new_password2	= $("#new_password2").val();
	
	if(old_password == "" || new_password1 == "")
		alert("请将信息填写完全!");
	else if(new_password1 != new_password2)
		alert("两次密码不一致，请检查!")
	else
		$("#form_repwd").submit();
});
</script>
</block>